package cn.qzuie.smart.module.dorm.controller.admin.energyequipment.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;
import cn.qzuie.smart.framework.excel.core.annotations.DictFormat;
import cn.qzuie.smart.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 能源设备 Response VO")
@Data
@ExcelIgnoreUnannotated
public class EnergyEquipmentRespVO {

    @Schema(description = "表号")
    @ExcelProperty("表号")
    private String mac;

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9102")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "宿舍编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22810")
    @ExcelProperty("宿舍编号")
    private Long dormitoryId;

    @Schema(description = "类型：空调0，照明1，水2", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "类型：空调0，照明1，水2", converter = DictConvert.class)
    @DictFormat("dorm_energy_equi") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "4097")
    @ExcelProperty("价格")
    private Double price;

    @Schema(description = "网关", example = "963")
    @ExcelProperty("网关")
    private Long gatewayId;

    @Schema(description = "是否远程控制（开启1，关闭0）")
    @ExcelProperty(value = "是否远程控制（开启1，关闭0）", converter = DictConvert.class)
    @DictFormat("dorm_isRemote") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer isRemote;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}